from django import forms

from .models import UserPage,CommentUser,Avatar

class UserPageForm(forms.ModelForm):
	class Meta:
		model = UserPage
		fields = ['text']
		labels = {'text':'个人简介'}
		widgets = {'text':forms.Textarea(attrs={'cols':80})}

class CommentUserForm(forms.ModelForm):
	class Meta:
		model = CommentUser
		fields = ['text']
		labels = {'text':'留言（最多512个汉字）'}
		widgets = {'text':forms.Textarea(attrs={'cols':80})}

class AvatarForm(forms.ModelForm):
	class Meta:
		model = Avatar
		fields = ['image']
		labels = {'image':'头像'}
